<template>
  <div>
    <div>
      <detail-component :parent_id="this.$route.query.id"></detail-component>
<!--      <detail-component ref="detailComponent" :parent_id="contractApply.id"></detail-component>-->


      <el-descriptions  :column="1" border>
        <el-descriptions-item label="计划部审核意见" :span="1">
          {{contractApply.planOpinion}}

        </el-descriptions-item>
        <el-descriptions-item label="财务部审核意见" :span="1">
          {{contractApply.financeOpinion}}

        </el-descriptions-item>
        <el-descriptions-item label="厂长审核意见" :span="1">
          {{contractApply.leadOpinion}}


        </el-descriptions-item>
      </el-descriptions>
    </div>

    <!--    底部按钮-->
    <div class="bottom">
      <!--        <el-button type="primary" @click="confirm">确认</el-button>-->

      <el-button @click="back">返回</el-button>

    </div>

  </div>
</template>

<script>
import detailComponent from "@/views/contractapply/detail-component.vue";
export default {
  data(){
    return{
      "contractApply": {
        "id": 0,
        "planAgree": null,
        "planOpinion": null,
        "planDate": null,
        "financeId": null,
        "finance": null,
        "financeAgree": null,
        "financeOpinion": null,
        "financeDate": null,
        "leaderId": null,
        "leader": null,
        "leadAgree": null,
        "leadOpinion": null,
        "leadDate": null,
        "status": "待审",

      },
    }
  },

  components:{
    detailComponent
  },
  mounted() {
    this.contractApply.id = this.$route.query.id
    this.getData();
  },
  methods:{
    back(){
      this.$router.go(-1)
    },
    getData() {
      this.$http({
        url: this.$http.adornUrl(`purchase/contractapply/info/${this.contractApply.id}`),
        method: 'get',

      }).then((data) => {
        this.loading = false
        this.contractApply = data.contractApply
      })
    },
  }

}
</script>

<style lang="scss" scoped>
.bottom{
  text-align: right;
  margin-top: 20px;
}
::v-deep .el-descriptions-item__cell.el-descriptions-item__label.is-bordered-label{

  width: 150px!important;
}
</style>
